package com.swd.order.util;


//import lombok.extern.slf4j.Slf4j;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//import org.springframework.stereotype.Component;
//import org.springframework.web.context.request.RequestContextHolder;
//import org.springframework.web.context.request.ServletRequestAttributes;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.Map;
//
//@Aspect
//@Component
//@Slf4j
//public class LogAspect {
//
//    @Pointcut("execution(public * com.swd.order.controller.*.*(..))")
//    public void webLog() {
//
//    }
//
//    @Around("webLog()")
//    public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
//        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        HttpServletRequest request = requestAttributes.getRequest();
//
//        Map<String, String[]> parameterMap = request.getParameterMap();
//        log.info("请求的接口{}",joinPoint.getTarget());
//        parameterMap.forEach((key,value)->{
//            log.info("请求的参数-{}:{}",key,value);
//        });
//        return   joinPoint.proceed();
//    }
//
//}
